bitkeeper revision 1.122.1.13 (3e70f911KaQqE5hysMl8FEBceVLlvA)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 13 Mar 2003 21:33:05 +0000 (21:33 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 13 Mar 2003 21:33:05 +0000 (21:33 +0000)
smpboot.h, io_apic.c:
  Round robin allocate IRQs to processors on SMP.

xen/arch/i386/io_apic.c
xen/include/asm-i386/smpboot.h

index 878c189afbc6df0eb04fcbf8c7a54fb5906abe2d..6ad37f2399b45fe92e7f68658bdc00806dba3483 100644 (file)
@@ -826,7 +826,6 @@ void __init print_IO_APIC(void)
                        UNEXPECTED_IO_APIC();
        }
 
-#if 0
        printk(KERN_DEBUG ".... IRQ redirection table:\n");
 
        printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol"
@@ -871,7 +870,6 @@ void __init print_IO_APIC(void)
                        entry = irq_2_pin + entry->next;
                }
                printk("\n");
-#endif
        }
 
        printk(KERN_INFO ".................................... done.\n");
index ece215fab003a35139c38f8ca8501b4fef7a5a44..3ca484d53108a0306f3b8b6181695648c647c9d4 100644 (file)
@@ -116,6 +116,15 @@ static inline int target_cpus(void)
        return cpu_online_map;
 }
 #else
-#define target_cpus() (0x01)
+/* KAF Xen: Round-robin allocate IRQs to CPUs. */
+static inline int target_cpus(void)
+{
+    static unsigned int cpu_field = 1;
+    do { 
+        cpu_field <<= 1; 
+        if ( cpu_field == 0x100 ) cpu_field = 1; /* logical field == 8 bits */ 
+    } while ( (cpu_field & cpu_online_map) == 0 );
+    return cpu_field;
+}
 #endif
 #endif